home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cgazv5n5.arc
/
PROFINIT.C
< prev
next >
Wrap
Text File
|
1991-09-23
|
2KB
|
74 lines
/*--- Listing 2 --------------------------- PROFINIT.C ----
* Author : Mark Florence, San Francisco Canyon Co, Inc.
* History : 01/27/91 Initial Implementation
* Compiler : MS C6.00a (Large model)
*-------------------------------------------------------*/
// Includes
#define INCL_DOS
#include <os2.h>
#include "Profiler.h"
// Global Variables
int dummy; // Needed to fool MS C6.00a
// Handle and Acknowledge Signals
VOID PASCAL FAR ProfilerSignalHandler (usSigArg, usSigNum)
USHORT usSigArg;
USHORT usSigNum;
// Handle and acknowledge signals
{ DosSetSigHandler (ProfilerSignalHandler, NULL, NULL,
SIGA_ACKNOWLEDGE, SIG_PFLG_A);
return;
}
// Terminate Profiler
VOID PASCAL FAR ProfilerTerminate (usTermCode)
USHORT usTermCode;
// Terminate Profiler signalling
{ DosSetSigHandler (ProfilerSignalHandler, NULL, NULL,
SIGA_KILL, SIG_PFLG_A);
// Terminate exit list
DosExitList (EXLST_EXIT, NULL);
}
// Initialize Profiler
VOID EXPENTRY ProfilerInitialize (VOID)
// Define function data
{ PIDINFO pidi; // Process information
// Get current process information
DosGetPID (&pidi);
// Start Profiler signalling
DosSetSigHandler (ProfilerSignalHandler, NULL, NULL,
SIGA_ACCEPT, SIG_PFLG_A);
// Define exit list
DosExitList (EXLST_ADD, ProfilerTerminate);
}